import { post, get } from "../utils/request";
import type { bannerInfo, updateBannerInfo } from "../utils/types";
const bannerList = () => get("banner/list");

const addBanner = (data: bannerInfo) => post("banner/add", data);

const updateBanner = (data: updateBannerInfo) => post("banner/updateFlag", data);

const deleteBanner = (bannerid: string) => get("banner/delete", { bannerid });

const removeAllBanner = () => get("banner/removeAll");

export default {
  bannerList,
  addBanner,
  updateBanner,
  deleteBanner,
  removeAllBanner,
};
